package com.zb.vo;

import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @Author WEN
 * @Date 2024/1/7 0007
 **/
@Data
@ApiModel("商品库存查询对象")
public class GoodsStockSelectVo {

    @NotNull(message = "商品类型不能为空")
    @NumberPattern(regexp = "[1|2]", message = "商品类型参数不合法", required = true)
    @ApiModelProperty(value = "商品类型：1-成品，2-配件", required = true)
    private Integer type;

    @NotNull(message = "商品ID不能为空")
    @ApiModelProperty(value = "商品ID", required = true)
    private Long goodsId;

    @NotNull(message = "商品规格ID不能为空")
    @ApiModelProperty(value = "商品规格ID", required = true)
    private Long goodsSpecId;

    @NotNull(message = "仓库ID不能为空")
    @ApiModelProperty(value = "仓库ID", required = true)
    private Long storeId;

    @ApiModelProperty(value = "仓库仓位ID，当仓库启用仓位时，此字段必传")
    private Long storePositionId;

    public GoodsStockSelectVo() {
    }

    public GoodsStockSelectVo(Integer type, Long goodsId, Long goodsSpecId, Long storeId, Long storePositionId) {
        this.type = type;
        this.goodsId = goodsId;
        this.goodsSpecId = goodsSpecId;
        this.storeId = storeId;
        this.storePositionId = storePositionId;
    }
}
